package cn.com.bluemoon.daps.api.sys;

import cn.com.bluemoon.daps.api.sys.factory.RemoteSysOperateLogServiceFallbackFactory;
import cn.com.bluemoon.daps.common.constant.ServiceNameConstants.DapsApiSystem;
import cn.com.bluemoon.daps.common.domain.ResultBean;
import cn.com.bluemoon.daps.system.dto.OperateLogPageDTO;
import cn.com.bluemoon.daps.system.entity.DapOperateLog;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;


/**
 * 操作日志服务接口
 *
 * @author luolq
 * @date 2022/2/28 11:09
 */
@FeignClient(value = DapsApiSystem.SERVICE, fallbackFactory = RemoteSysOperateLogServiceFallbackFactory.class)
@RequestMapping(DapsApiSystem.BASE_URI + DapsApiSystem.API_SYS_LOG)
@ApiIgnore
public interface RemoteSysOperateLogService {

    @PostMapping("/page")
    @ApiOperation(value = "分页查询操作日志")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "ok", response = ResultBean.class)})
    ResultBean<IPage<DapOperateLog>> operateLogPage(OperateLogPageDTO dto);

    @PostMapping("/addOperateLog")
    @ApiOperation(value = "新增操作日志")
    @ApiResponses(value = {@ApiResponse(code = 200, message = "ok", response = ResultBean.class)})
    ResultBean<Boolean> addOperateLog(@RequestBody DapOperateLog operateLog);

}
